package personal.vivian.builder;

import personal.vivian.interf.TransformOpertion;
import personal.vivian.logic.DataContext;
import personal.vivian.logic.DataManager;

public class DataTransformer<T> {
    private DataManager dataManager;

    public <T> TransformOpertion<T> with(T item) {
            DataContext context=new DataContext();
            context.setDataManager(dataManager);
            return with(context,item);
    }

    public <T> TransformOpertion<T> with(DataContext context,T item) {
            TransformOpertion transformOpertion=new TransformOpertion(this,context,item);
            return transformOpertion;
    }
    public DataTemplate addTemplate(TransformBuilder transformBuilder){
        transformBuilder.setDataManager(dataManager);
        return transformBuilder.buildTemplate();
    }
    public DataManager getDataManager() {
        return dataManager;
    }

    public void setDataManager(DataManager dataManager) {
        this.dataManager = dataManager;
    }
}
